import { Button, Space, Table } from "antd"
import { ColumnsType } from "antd/es/table"
import React from "react"
const list = [
{
    apiName:'图生图',
    apiPath:'/api/image-to-image',
    method:'POST',
    contentType:'application/json'
},
{
    apiName:'文生图',
    apiPath:'/api/text-to-image',
    method:'POST',
    contentType:'application/json'
}
]
const App = ()=>{
const columns:ColumnsType<any> = [
    {
        title:'API名称',
        dataIndex:'apiName'
    },
    {
        title:'API路径',
        dataIndex:'apiPath'
    },
    {
        title:'请求方式',
        dataIndex:'method'
         
    },
    {
        title:'请求类型',
        dataIndex:'contentType'
        
    },{
        title:'操作',
        render(value, record, index) {
            return <Space>
                <Button type="link">编辑</Button>
                <Button type="link">供应商</Button>
            </Space>
        },
    }
]
return <div>
    <Table dataSource={list} columns={columns}/>
</div>
}
export default App